﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using PracticalNEU.Models;

namespace PracticalNEU.Services
{
    /// <summary>
    /// 今日天气接口。
    /// </summary>
    public interface ITodayWeatherStorage
    {
        /// <summary>
        /// 初始化数据库。
        /// </summary>
        Task InitializeAsync();

        /// <summary>
        /// 是否已经初始化。
        /// </summary>
        bool IsInitialized();

        /// <summary>
        /// 从api保存今日天气至数据库。
        /// </summary>
        /// <param name="todayWeather"></param>
        /// <returns></returns>
        Task<int> SaveTodayWeatherInfoAsync(TodayWeather todayWeather);

        /// <summary>
        /// 获取今日天气。
        /// </summary>
        /// <returns></returns>
        Task GetTodayWeatherFromApiAsync();

        /// <summary>
        /// 从数据库获取今日天气。
        /// </summary>
        /// <returns></returns>
        Task<TodayWeather> GetTodayWeatherFromDataBaseAsync();
    }
}
